<?php
	$data = array();
	$id = $_GET['cid'];
	$data['template'] = "product/pro_cate_view";
	$db = new model_mpro;
	$data['cate_detail'] = $db->get_cate($id);
	//debug($data['cago_detail']);
	$pager = new libraries_pager;
	$pager->set_link("index.php?page=product&act=list_cate&cid=".$id."");
	$limit = 16;
	$total = $db->total_cate($id);
	$start = $pager->start();
	$pages = $pager->page($total,$limit,$id);
	$data['cate'] = $db->list_cate();
	$data['title'] = $data['cate_detail']['cate_name'];
	$data['pagelist'] = $pager->listpage($pages,$start,$limit);
	$data['list_pro'] = $db->list_pro_cate($start,$limit,$id);
	loadview("layout",$data);
?>